home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / TC Prog Guide.cpt / picture ƒ / cube.h < prev    next >
Text File  |  1991-02-16  |  976b  |  42 lines

  1. /*
  2. *    FILE:        cube.h
  3. *    AUTHOR:        R. Gonzalez
  4. *    CREATED:    October 6, 1990
  5. *
  6. *    Defines cube for picture application.
  7. */
  8.  
  9. # ifndef    cube_h
  10. # define    cube_h
  11.  
  12. # include    "segment.h"
  13. # include    "color.h"
  14.  
  15. /******************************************************************
  16. *   cube.  Nested segment consisting of 12 lines.
  17. ******************************************************************/
  18. struct    Cube:Nested_Segment
  19. {
  20.     boolean            init(void);
  21. };
  22.  
  23. /******************************************************************
  24. *   fast cube.  Not a nested segment.  Faster because you only
  25. *    calculate perspective projection for each line endpoint once.
  26. ******************************************************************/
  27. struct    Fast_Cube:Segment
  28. {
  29.     Coord3            *c[8];
  30.     color            cube_color;
  31.  
  32.     boolean            init(void);
  33. /*    not implemented:
  34.     virtual void    set(...);
  35. */
  36.     void            set_color(color);
  37.     void            draw(Camera*,Projector*,Transformation*);
  38.     void            move(Transformation*);
  39.     boolean            destroy(void);
  40. };
  41.  
  42. # endif